#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>

int main()
{
    int fd = open("log.txt", O_RDONLY);

    char buffer[1024];
    ssize_t ret1 = read(fd, buffer, 1024);

    printf("ret1 = %ld\n", ret1);
    printf("%s", buffer);

    ssize_t ret2 = read(fd, buffer, 1024);
    printf("ret2 = %ld\n", ret2);

    close(fd);

    return 0;
}
